package patterndesign.abstractfactory;

import java.applet.Applet;
import java.awt.*;

/**
 * @Date 2022/5/5
 * @Created by Jonathan
 */
public class Test extends Applet {

    float[] x = {1.2f, 3.4f, 5.6f, 7.8f};

    public void paint(Graphics g) {

        int s = 0;

        for (int i = 0; i < x.length; i++)
            s +=  x[i];
        g.drawString(" " + s, 30, 60);

    }

    public static void main(String[] args) {
        float[] x = {1.2f, 3.4f, 5.6f, 7.8f};
        int s = 0;
        for (int i = 0; i < x.length; i++)
            s +=  x[i];
        System.out.println(s);
        final Test test = new Test();
//        Graphics graphics =
        //test.paint(new G);
    }

}